package com.flejay.dreamrecruiter.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Represente un bloc du CV
 * 
 * @author Victor Fleurant
 *
 */
public final class Block extends AbstractBlock{

	private Block(){
		super();
	}
	
	public static Block getNewInstance(){
		Block block = new Block();
		block.setAssociatedTag(null);
		block.subBlockList = new ArrayList<SubBlock>();
		block.setContent(new StringBuffer());
		return block;
	}
	
	@SuppressWarnings("unused")
	private transient String label;
	
	// sous-bloc associé  au bloc
	private List<SubBlock> subBlockList;
	
	public List<SubBlock> getSubBlockList() {
		return subBlockList;
	}

	public void setSubBlockList(final List<SubBlock> subBlockList) {
		this.subBlockList = subBlockList;
	}

	public String getLabel() {
		return (getAssociatedTag() != null) ? getAssociatedTag().getLabel() : "";
	}

	public void setLabel(final String label) {
		this.label = label;
	}
}
